<template>
    <div class="main">
        <top ref="top" @showlogin="showlogin" ></top>
        <div>

            <div class="videoMain">
                <login  @loginSuccess="loginSuccess"></login>
            </div>
        </div>

        <!-- 底部 -->
        <bottom></bottom>
        <!-- 机器人 -->
        <robot></robot>
    </div>
</template>

<script>
import top from '@/components/top'
import robot from '@/components/robot'
import bottom from '@/components/bottom'
import login from '@/components/login'
export default {
    name: "home",
    components: {
        top,
        login,
        bottom,
        robot,

    },
    data() {
        return {
            showLogin:false
        };
    },
    created() {
        let token = sessionStorage.getItem('token')?true:false
        this.showLogin = !token
     },
    mounted() {

    },
    methods: {
        showlogin(){
            this.showLogin = true
        },
        loginSuccess(){
            this.showLogin = false
            this.$refs.top.isLogin = true
        }
    },
};
</script>

<style lang="less" scoped>
.homtTab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    outline: 0px;
    -webkit-tap-highlight-color: transparent;
    display: block;
    text-decoration: none;
    color: rgb(193, 194, 197);
    box-sizing: border-box;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 3px, rgba(0, 0, 0, 0.1) 0px 1px 2px;
    position: sticky;
    top: 0px;
    left: 0px;
    z-index: 100;
    border-radius: 0px;
    transition: transform 0.3s ease 0s;
    background: rgb(37, 38, 43);
    margin-bottom: 16px;
    padding: 4px 8px;

    .list {
        background-color: transparent;
        text-align: left;
        text-decoration: none;
        box-sizing: border-box;
        position: relative;
        font-size: 14px;
        white-space: nowrap;
        z-index: 0;
        display: flex;
        align-items: center;
        line-height: 1;
        border-radius: 32px;
        color: rgb(254, 254, 254);

        .li {
            margin-right: 10px;
            display: flex;
            align-items: center;
            border-radius: 32px;
            padding: 8px 16px 8px 10px;
            cursor: pointer;
            position: relative;

            i {
                font-size: 10px;
                height: 18px;
                line-height: 16px;
                text-decoration: none;
                padding: 0px 8px;
                box-sizing: border-box;
                display: inline-flex;
                -webkit-box-align: center;
                align-items: center;
                -webkit-box-pack: center;
                justify-content: center;
                width: auto;
                text-transform: uppercase;
                border-radius: 32px;
                font-weight: 700;
                letter-spacing: 0.25px;
                cursor: inherit;
                text-overflow: ellipsis;
                overflow: hidden;
                background: rgb(240, 140, 0);
                color: rgb(254, 254, 254);
                border: 1px solid transparent;
                margin-left: 4px;
            }
        }

        .active {
            background-color: rgb(55, 58, 64);
        }

        .li:hover {
            background-color: rgb(55, 58, 64);
        }

        svg {
            margin-right: 7px;
        }

        span {
            text-decoration: none;
            font-size: 15px;
            font-weight: 500;
            text-transform: capitalize;
        }
    }
}
</style>
